Skip to content

fix(FR-2853): restore copymonaco script lost during 26.4 main-merge#7326

Merged
yomybaby merged 1 commit into
26.4from
fix/FR-2853-restore-copymonaco-26.4
May 9, 2026
Merged

fix(FR-2853): restore copymonaco script lost during 26.4 main-merge#7326
yomybaby merged 1 commit into
26.4from
fix/FR-2853-restore-copymonaco-26.4

Conversation

@yomybaby
Copy link
Copy Markdown
Member

@yomybaby yomybaby commented May 9, 2026

Resolves FR-2853

Problem

Releases v26.4.6 and v26.4.7 ship a release zip that is missing the Monaco editor bundle. After unpacking, resources/monaco/vs/loader.js and the rest of resources/monaco/vs/ are absent, so any UI that uses Monaco (VFolder file editor, Theme JSON config modal) fails to load with a 404 on /resources/monaco/vs/loader.js in deployed environments.

Root cause

PR #6959 (FR-2697, commit 547b702f1, 2026-04-24) added a root copymonaco npm script and wired it into the root build chain so the Monaco AMD tree is copied from react/node_modules/monaco-editor/min/vs into build/web/resources/monaco/vs/ during the production build. CI bundles build/web/ directly into the release zip via Makefile:201 bundle (called from .github/workflows/package.yml build_web job), so the copymonaco step is what makes Monaco end up in the release artifact.

The merge commit e5ea9500f ("Merge branch 'main' into 26.4", 2026-04-24) brought 547b702f1 into the 26.4 release branch but, while resolving conflicts in package.json / electron-app/package.json / index.html, both the copymonaco script definition and its invocation in build were silently dropped from root package.json.

Verification:

  • git show v26.4.7:package.json | grep monaco → empty.
  • git show v26.4.6:package.json | grep monaco → empty.
  • git show origin/main:package.json | grep monaco → both lines present (correct).
  • git merge-base v26.4.5 547b702f1 resolves to 64b9edbcb; at the merge base the build line did not contain copymonaco. Only 547b702f1 (one parent of the merge) added it, and 26.4 never modified it — a clean 3-way merge would have brought it through. The deletion was a manual resolution mistake in the merge commit.

main is unaffected, which is why local builds done from main reproduce Monaco correctly and the regression was not caught before two releases.

Fix

Restore the two lines in root package.json (effectively cherry-picking only the package.json hunk of 547b702f1):

  1. In scripts.build, re-insert && pnpm run copymonaco between copyconfig and tsc.
  2. Re-add "copymonaco": "mkdir -p build/web/resources/monaco/vs && cp -R react/node_modules/monaco-editor/min/vs/. build/web/resources/monaco/vs/" under scripts.

Test plan

  • pnpm run build produces build/web/resources/monaco/vs/loader.js (and the rest of the Monaco tree).
  • make bundle produced zip contains resources/monaco/vs/loader.js and the language sub-trees.
  • Open VFolder file editor and Theme JSON config modal against a build served from build/web/ — both load with no 404 on /resources/monaco/vs/*.
  • Cut v26.4.8 patch release including this fix.

Follow-up (separate issue, not in this PR)

Add a CI guard in the build_web job that fails the build if build/web/resources/monaco/vs/loader.js is absent — the failure mode here was silent (build succeeded, only the runtime broke), and a one-line existence check would have caught it.

Resolves #FR-2853

The merge commit e5ea950 ("Merge branch 'main' into 26.4", 2026-04-24)
brought PR #6959 (FR-2697, self-host Monaco) into the 26.4 release branch
but, while resolving conflicts in package.json/electron-app/package.json/
index.html, both the `copymonaco` script definition and its invocation in
the `build` chain were silently dropped from root package.json.

As a result v26.4.6 and v26.4.7 ship a release zip with no
`resources/monaco/vs/` tree, and any UI that uses Monaco (VFolder file
editor, Theme JSON config modal) fails to load `/resources/monaco/vs/loader.js`
in deployed environments.

main is unaffected, which is why local builds reproduced fine and the
regression went unnoticed through two releases.

Restore the two lost lines in root package.json:
1. Re-insert `&& pnpm run copymonaco` between `copyconfig` and `tsc`
   in the `build` script.
2. Re-add the `copymonaco` script definition.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings May 9, 2026 06:39
@github-actions github-actions Bot added the size:XS ~10 LoC label May 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Restores the previously-introduced root build step that copies the self-hosted Monaco Editor AMD bundle into the build/web/ artifact, fixing missing /resources/monaco/vs/loader.js in release zips for the 26.4 branch.

Changes:

  • Re-add pnpm run copymonaco into the root build script chain.
  • Re-introduce the root copymonaco script to copy react/node_modules/monaco-editor/min/vs into build/web/resources/monaco/vs/.

@yomybaby yomybaby merged commit 06ad395 into 26.4 May 9, 2026
9 checks passed
@yomybaby yomybaby deleted the fix/FR-2853-restore-copymonaco-26.4 branch May 9, 2026 09:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XS ~10 LoC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants